1. Field of the Invention
The present invention relates to a method for capturing images utilized in a scanning device, and more particularly to a method enabling a scanning range of a normal scan maps to a predetermined range selected under preview.
2. Description of the Prior Art
Conventionally, a desktop scanning device, for example flat-bed scanner, utilizes a stepping motor to move a scanning head to sweep an object, such as document, picture and photograph, for scanning a content of the object. The scanning head includes a charge-coupled device which is a linear photo-sensing device having at least a column composed of a plurality of photo-sensing cells. When the stepping motor moves the scanning head to sweep an object, the charge-coupled device repeatedly captures a linear image from the object. Each linear image is composed of a plurality of pixels.
In typical, a scanning device provides various scanning resolutions, for example 600 dpi, 300 dpi, 200 dpi, and even 50 dpi. The higher a scanning resolution is, the more pixels an image has. The scanning resolution is inversely in proportion to the multiple of a scan line sweep rate and an exposure time of the charge-coupled device. The scan line sweep rate depends on a design standard of the stepping motor (reference to below) and a resolution of the stepping motor (reference to below). When the charge-coupled device is moved forward along a scanning direction to capture a linear image, the design standard of the stepping motor is a step angle moves the scanning head, namely the charge-coupled device, to scan {fraction (1/600)} inches, and the resolution of the stepping motor is one control pulse drives the stepping motor to walk xc2xc step angle to move the scanning head for scanning an object. Thus, four control pulses are required for driving the stepping motor to walk a step angle. That is, four control pulses are required for the stepping motor to scan a scan line with 600 dpi scanning resolution. However, in order to scan a scan line with 50 dpi scanning resolution, the stepping motor needs to walk 12 step angles. That is, 48 control pulses are required for the stepping motor to scan a scan line with 50 dpi scanning resolution. In case that an exposure time of the charge-coupled device for both of a scan action with 50 dpi scanning resolution and a scan action with 600 dpi scanning resolution is 5469 pixels, at the scan action with 50 dpi scanning resolution, the scan lines scanned by the stepping motor depend on 5469=113*48+45. Therefore, there would be 45 accumulated pixels when the stepping motor scans a scan line. When scanning a paper sheet having an 8-inch length by the scan action with 50 dpi scanning resolution, there would be 50*8*45=18000 accumulated pixels. Moreover, 18000=113*159+33, wherein 159 means excess control pulses sent to the stepping motor due to the 18000 accumulated pixels. However, xe2x80x9c33xe2x80x9d means a residue which is seen as representing one excess control pulse sent to the stepping motor. Therefore, there are 160 excess control pulses sent to the stepping motor due to the 18000 accumulated pixels. At the scan action with 600 dpi scanning resolution, the scan lines scanned by the stepping motor depend on 5469=1367*4+1, meaning that there is one accumulated pixels when the stepping motor scans a scan line. When scanning a paper sheet with an 8-inch length by the scan action with 600 dpi scanning resolution, there would be 600*8*1=4800 accumulated pixels. Moreover, 4800=1367*3+699, wherein 3 means excess control pulses sent to the stepping motor due to the 4800 accumulated pixels. However, xe2x80x9c699xe2x80x9d means a residue which is seen as representing one excess control pulse sent to the stepping motor. Therefore, there are four excess control pulses sent to the stepping motor due to the 4800 accumulated pixels. In accordance with the above conditions, the 160 excess control pulses due to the 18000 accumulated pixels at the scan action with 50 dpi scanning resolution corresponds to the scan action with 600 dpi scanning resolution: 160/4=40 scan lines; while the four excess control pulses due to the 4800 accumulated pixels at the scan action with 600 dpi scanning resolution: 4/4=1 scan line. Thus, line difference between the image with 50 dpi scanning resolution and the image with 600 dpi scanning resolution is 40xe2x88x921=39 scan lines. When a predetermined range, for a normal scan with 600 dpi scanning resolution, is selected under preview of a result of a preview scan with 50 dpi scanning resolution, the above problem of line difference between the image with 50 dpi scanning resolution and the image with 600 dpi scanning resolution would result in that a scanning range of the normal scan with 600 dpi scanning resolution can not map to the predetermined range selected under the preview. As a result, it is very inconvenient for a user to select a predetermined range under preview.
Accordingly, it is an intention to provide an improved method for capturing images from an object employed in a scanning device to overcome the above drawback.
It is one objective of the present invention to provide a method enabling a scanning range of a normal scan to map a predetermined range selected under preview in a scanning device, which calculates excess control pulses sent to a stepping motor during respective exposure times at different scanning resolutions, and accordingly determines control pulses required by the stepping motor for a normal scan such that the scanning range exactly maps to a predetermined range selected under preview.
It is another objective of the present invention to provide a method enabling a scanning range of a normal scan maps a predetermined range selected under preview in a scanning device, which corrects image differences resulting from the reason that an exposure time of an image sensing device does not keep pace with control pulses sent to a stepping motor when the exposure time and the control pulses are in unit of pixel.
In order to achieve the above objectives of this invention, the present invention provides a method enabling a scanning range of a normal scan maps a predetermined range selected under preview in a scanning device. The scanning device includes a scanning head and a stepping motor. The stepping motor serves to move the scanning head to linearly scan an object. The scanning head has a linear image sensing device to capture a linear image from the object, and the linear image is composed of a plurality of pixels. The present method comprises the following steps. When performing a preview scan with a first predetermined scanning resolution, in accordance with a first exposure time of the linear image sensing device and a first control pulses sent to the stepping motor for scanning a scan line to obtain an excess second control pulses sent to the stepping motor for scanning a predetermined scanning length. When performing a normal scan with a second predetermined scanning resolution, in accordance with a second exposure time of the linear image sensing device and a third control pulses sent to the stepping motor for scanning a scan line to obtain an excess fourth control pulses sent to the stepping motor for scanning the predetermined scanning length. Under preview of a result of the preview scan, selecting the predetermined scanning length as a predetermined range for performing the normal scan, in accordance with the second control pulses, the third control pulses and the fourth control pulses to determine a predetermined control pulses required by the stepping motor and a predetermined scan lines scanned by the stepping motor for the normal scan such that a scanning range of the normal scan maps the predetermined range.